﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using InstantNaukriDAL;
using System.IO;
using System.Globalization;
using System.ComponentModel;
using System.Windows.Forms;
using System.Collections.Generic;

public partial class JobseekerPrieview : System.Web.UI.Page
{
    int ProfileId = 0, UserId = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["UserId"] == null)
                Response.Redirect("Default.aspx");
            string roleid = "";
            clsUserLoginDAL objclsUserLoginDAL = new clsUserLoginDAL();
            if (Request.QueryString["roleid"] != null)
                roleid = clsEncryptionDecryption.Decrypt(Request.QueryString["roleid"].ToString());
            if (roleid == "4")
            {
                IN_TB_USER objIN_TB_USER = new IN_TB_USER();
                if (Session["UserId"] != null)
                    objIN_TB_USER = objclsUserLoginDAL.GetUserByID(Convert.ToInt32(Session["UserId"].ToString()));
                if (objIN_TB_USER != null)
                {
                    Session["UserId"] = objIN_TB_USER.ID;
                    dvAutority.Visible = true;
                    // Filllbls();
                    CreateRESUME_SKILLList();
                    CreateProjectList();
                    FillGeneralInfo(objIN_TB_USER.ID);
                    FillResumeDetails(objIN_TB_USER.ID);
                    FillProjectDetails(objIN_TB_USER.ID);
                    FillSkillsUsed(objIN_TB_USER.ID);
                    FillOtherInfo(objIN_TB_USER.ID);
                    aGeneralInfo.HRef = "EditGeneralInfo.aspx?roleid=" + Request.QueryString["roleid"].ToString();
                    aOtherInformation.HRef = "EditOtherInformation.aspx?roleid=" + Request.QueryString["roleid"].ToString();
                    aprofessionalDetails.HRef = "EditProfessionalDetails.aspx?roleid=" + Request.QueryString["roleid"].ToString();
                    aProjectDetails.HRef = "EditProjectDetails.aspx?roleid=" + Request.QueryString["roleid"].ToString();
                    aTechnologyUsed.HRef = "EditTechnologyUsed.aspx?roleid=" + Request.QueryString["roleid"].ToString();
                    aPersonalInfo.HRef = "EditPersonalInfo.aspx?roleid=" + Request.QueryString["roleid"].ToString();
                }
            }
        }
    }

    protected void FillGeneralInfo(int UserId)
    {
        try
        {
            clsProfileDAL objclsProfileDAL = new clsProfileDAL();
            IN_TB_PROFILE objIN_TB_PROFILE = new IN_TB_PROFILE();
            objIN_TB_PROFILE = objclsProfileDAL.GetProfileByUserId(UserId);
            if (objIN_TB_PROFILE != null)
            {
                ViewState["ProfileId"] = objIN_TB_PROFILE.ID;
                lblFirstName.Text = objIN_TB_PROFILE.F_NAME;
                lblMilbleName.Text = objIN_TB_PROFILE.M_NAME;
                lblLastName.Text = objIN_TB_PROFILE.L_NAME;
                DateTime dtdob = (DateTime)objIN_TB_PROFILE.DOB;
                lblDOB.Text = dtdob.ToString("dd-MMM-yyyy");
                int gender = Convert.ToInt32(objIN_TB_PROFILE.GENDER);
                if (gender == 1)
                {
                    lblGender.Text = "Female";
                }
                else
                    lblGender.Text = "Male";
                lblCity.Text = Convert.ToString(objIN_TB_PROFILE.CITY);
                lblPhoneNumber.Text = objIN_TB_PROFILE.PHONE;
                lblMobileNumber.Text = objIN_TB_PROFILE.MOBILE;
                lblEmail.Text = objIN_TB_PROFILE.EMAIL;
                lblFather.Text = objIN_TB_PROFILE.FATHER;
                lblAltEmail.Text = objIN_TB_PROFILE.ALTERNATEEMAIL;
                lblMailingAdd.Text = objIN_TB_PROFILE.MAILING_ADDRESS;
                lblMaritalStatus.Text = Convert.ToInt32(objIN_TB_PROFILE.MARITAL_STATUS).ToString();
                lblPinCode.Text = objIN_TB_PROFILE.PINCODE;

            }
        }
        catch (Exception)
        {

            throw;
        }
    }

    protected void FillResumeDetails(int UserId)
    {
        try
        {
            clsResumeDAL objclsResumeDAL = new clsResumeDAL();
            IN_TB_RESUME_MST ibjIN_TB_RESUME_MST = new IN_TB_RESUME_MST();
            ibjIN_TB_RESUME_MST = objclsResumeDAL.GetResumeByUserId(UserId);
            if (ibjIN_TB_RESUME_MST != null)
            {
                ViewState["ResumeMasterId"] = ibjIN_TB_RESUME_MST.ID;
                lblKeySkills.Text = Convert.ToString(ibjIN_TB_RESUME_MST.KEY_SKILLS);
                lblResumeheadline.Text = Convert.ToString(ibjIN_TB_RESUME_MST.RESUME_HEADLINE);
                lblResumeSummary.Text = Convert.ToString(ibjIN_TB_RESUME_MST.RESUME_SUMMARY);
                lblCTC.Text = Convert.ToString(ibjIN_TB_RESUME_MST.CTC);
                lblCurrentCompany.Text = Convert.ToString(ibjIN_TB_RESUME_MST.CURRENT_COMPANY);
                lblCurrentDesignation.Text = Convert.ToString(ibjIN_TB_RESUME_MST.CURRENT_DESIGNATION);
                lblPreferedLocation.Text = Convert.ToString(ibjIN_TB_RESUME_MST.PREFERRED_LOCATION);
                lblcurrentLocation.Text = Convert.ToString(ibjIN_TB_RESUME_MST.CURRENT_LOCATION);
                lblTotalExp.Text = Convert.ToString(ibjIN_TB_RESUME_MST.TOTAL_EXP);
                lblFuntionalArea.Text = Convert.ToString(ibjIN_TB_RESUME_MST.FUNCTIONAL_AREA);
            }
        }
        catch (Exception)
        {

            throw;
        }
    }

    protected void FillProjectDetails(int UserId)
    {
        try
        {
            List<IN_TB_USER_PROJECT> objIN_TB_USER_PROJECTList = new List<IN_TB_USER_PROJECT>();
            clsProjectDetailDAL objclsProjectDetailDAL = new clsProjectDetailDAL();
            objIN_TB_USER_PROJECTList = objclsProjectDetailDAL.GetProjectByUserId(UserId);
            if (objIN_TB_USER_PROJECTList != null)
            {
                grdProjectDetails.DataSource = objIN_TB_USER_PROJECTList;
                grdProjectDetails.DataBind();
                Session["objIN_TB_USER_PROJECT"] = objIN_TB_USER_PROJECTList;
            }
        }
        catch (Exception)
        {

            throw;
        }
    }

    protected void FillSkillsUsed(int UserId)
    {
        try
        {
            List<IN_TB_RRESUME_SKILL> objIN_TB_RRESUME_SKILLList = new List<IN_TB_RRESUME_SKILL>();
            clsResumeSkillsDAL objclsResumeSkillsDAL = new clsResumeSkillsDAL();
            objIN_TB_RRESUME_SKILLList = objclsResumeSkillsDAL.GetResumeSkillsByUserId(UserId);
            if (objIN_TB_RRESUME_SKILLList != null)
            {
                grdTechnology.DataSource = objIN_TB_RRESUME_SKILLList;
                grdTechnology.DataBind();
                Session["objIN_TB_RRESUME_SKILLList"] = objIN_TB_RRESUME_SKILLList;
            }
        }
        catch (Exception)
        {

            throw;
        }
    }

    protected void FillOtherInfo(int UserId)
    {
        try
        {
            clsOtherDAL objclsOtherDAL = new clsOtherDAL();
            IN_TB_OTHER ibjIN_TB_OTHER = new IN_TB_OTHER();
            ibjIN_TB_OTHER = objclsOtherDAL.GetOtherinfoByUserId(UserId);
            if (ibjIN_TB_OTHER != null)
            {
                lblDJobType.Text = Convert.ToString(ibjIN_TB_OTHER.DESIRED_JOB_TYPE);
                lblDemploymentType.Text = Convert.ToString(ibjIN_TB_OTHER.DESIRED_EMPOLOYMENT_TYPE);
                lblWorkPermitType.Text = Convert.ToString(ibjIN_TB_OTHER.WORK_PERMIT_LOCATION);
                int visaId = Convert.ToInt32(ibjIN_TB_OTHER.HAVE_VISA);
                if (visaId == 0)
                {
                    //lblHaveVisa.Text = Convert.ToString(ibjIN_TB_OTHER.HAVE_VISA);
                    lblHaveVisa.Text = "YES";
                }
                lblHaveVisa.Text = "NO";


                lblVisaType.Text = Convert.ToString(ibjIN_TB_OTHER.VISA_TYPE);
            }
        }
        catch (Exception)
        {

            throw;
        }
    }


    protected void btnupdateGeneralInfo_Click(object sender, EventArgs e)
    {
        try
        {


            clsUserLoginDAL objclsUserLoginDAL = new clsUserLoginDAL();
            //Saving User
            IN_TB_USER objIN_TB_USER = new IN_TB_USER();

            if (Session["UserId"] != null)
            {
                objIN_TB_USER = objclsUserLoginDAL.GetUserByID(Convert.ToInt32(Session["UserId"].ToString()));
                objIN_TB_USER.NAME = lblFirstName.Text;
                objIN_TB_USER.MOBILE = lblMobileNumber.Text;
                objIN_TB_USER.EMAIL = lblEmail.Text;
                objIN_TB_USER.STATUS = 1;
                objIN_TB_USER.ROLEID = 4;
                objIN_TB_USER.DOB = Convert.ToDateTime(lblDOB.Text);
                objIN_TB_USER.CREATED_BY = 1;
                UserId = objclsUserLoginDAL.SaveUser(objIN_TB_USER);
            }

            // Saving User Profile
            if (ViewState["ProfileId"] != null)
            {
                clsProfileDAL objclsProfileDAL = new clsProfileDAL();
                IN_TB_PROFILE objIN_TB_PROFILE = new IN_TB_PROFILE();
                int pid = Convert.ToInt32(ViewState["ProfileId"].ToString());
                objIN_TB_PROFILE = objclsProfileDAL.GetProfileById(pid);
                objIN_TB_PROFILE.F_NAME = lblFirstName.Text;
                objIN_TB_PROFILE.M_NAME = lblMilbleName.Text;
                objIN_TB_PROFILE.L_NAME = lblLastName.Text;
                objIN_TB_PROFILE.FATHER = lblFather.Text;
                objIN_TB_PROFILE.DOB = Convert.ToDateTime(lblDOB.Text);
                objIN_TB_PROFILE.GENDER = lblGender.Text;
                objIN_TB_PROFILE.CITY = Convert.ToInt32(lblCity.Text);
                objIN_TB_PROFILE.PHONE = lblPhoneNumber.Text;
                objIN_TB_PROFILE.MOBILE = lblMobileNumber.Text;
                objIN_TB_PROFILE.EMAIL = lblEmail.Text;
                if (Session["UserId"] != null)
                    objIN_TB_PROFILE.USER_ID = Convert.ToInt32(Session["UserId"]);
                int profieleid = objclsProfileDAL.SaveProfile(objIN_TB_PROFILE);
            }
        }
        catch (Exception)
        {

            throw;
        }
    }
    protected void btnUpdateProfessionalDetails_Click(object sender, EventArgs e)
    {
        try
        {
            if (Session["UserId"] != null && ViewState["ResumeMasterId"] != null)
            {
                int rid = Convert.ToInt32(ViewState["ResumeMasterId"].ToString());
                clsResumeDAL objclsResumeDAL = new clsResumeDAL();
                IN_TB_RESUME_MST ibjIN_TB_RESUME_MST = new IN_TB_RESUME_MST();
                ibjIN_TB_RESUME_MST = objclsResumeDAL.GetResumeById(rid);
                ibjIN_TB_RESUME_MST.KEY_SKILLS = lblKeySkills.Text;
                ibjIN_TB_RESUME_MST.RESUME_HEADLINE = lblResumeheadline.Text;
                ibjIN_TB_RESUME_MST.RESUME_SUMMARY = lblResumeSummary.Text;
                ibjIN_TB_RESUME_MST.CTC = lblCTC.Text;
                ibjIN_TB_RESUME_MST.CURRENT_DESIGNATION = lblCurrentDesignation.Text;
                ibjIN_TB_RESUME_MST.CURRENT_COMPANY = lblCurrentCompany.Text;
                ibjIN_TB_RESUME_MST.PREFERRED_LOCATION = lblPreferedLocation.Text;
                ibjIN_TB_RESUME_MST.CURRENT_LOCATION = Convert.ToInt32(lblcurrentLocation.Text);
                ibjIN_TB_RESUME_MST.TOTAL_EXP = Convert.ToInt32(lblTotalExp.Text);
                ibjIN_TB_RESUME_MST.FUNCTIONAL_AREA = Convert.ToInt32(lblFuntionalArea.Text);
                ibjIN_TB_RESUME_MST.USER_ID = Convert.ToInt32(Session["UserId"]);
                if (fuResume.HasFile)
                {
                    // Saving User Resume
                    string CVPath = Server.MapPath("~/Resumes/");
                    DirectoryInfo objFileInfo = new DirectoryInfo(CVPath);
                    if (!objFileInfo.Exists)
                        objFileInfo.Create();
                    fuResume.SaveAs(CVPath + "/" + fuResume.FileName);
                    ibjIN_TB_RESUME_MST.RESUME_PATH = Convert.ToInt32(Session["UserId"]) + "/" + fuResume.FileName;
                }
                int resumeid = objclsResumeDAL.SaveResume(ibjIN_TB_RESUME_MST);
            }
        }
        catch (Exception)
        {

            throw;
        }

    }
    protected void btnProjectDetaiils_Click(object sender, EventArgs e)
    {
        try
        {
            List<IN_TB_USER_PROJECT> objIN_TB_USER_PROJECTList = new List<IN_TB_USER_PROJECT>();
            objIN_TB_USER_PROJECTList = (List<IN_TB_USER_PROJECT>)Session["objIN_TB_USER_PROJECT"];
            clsProjectDetailDAL objclsProjectDetailDAL = new clsProjectDetailDAL();

            foreach (IN_TB_USER_PROJECT objIN_TB_USER_PROJECT in objIN_TB_USER_PROJECTList)
            {
                if (Session["UserId"] != null)
                    objIN_TB_USER_PROJECT.USERID = Convert.ToInt32(Session["UserId"]);
                objIN_TB_USER_PROJECT.CREATED_BY = 1;
                objIN_TB_USER_PROJECT.MODIFIED_BY = 1;
                objclsProjectDetailDAL.SaveProject(objIN_TB_USER_PROJECT);
            }

        }
        catch (Exception)
        {

            throw;
        }




    }
    protected void btnResumeSkills_Click(object sender, EventArgs e)
    {
        try
        {
            List<IN_TB_RRESUME_SKILL> objIN_TB_RRESUME_SKILLList = new List<IN_TB_RRESUME_SKILL>();
            objIN_TB_RRESUME_SKILLList = (List<IN_TB_RRESUME_SKILL>)Session["objIN_TB_RRESUME_SKILLList"];

            clsResumeSkillsDAL objclsResumeSkillsDAL = new clsResumeSkillsDAL();
            foreach (IN_TB_RRESUME_SKILL ibjIN_TB_RRESUME_SKILL in objIN_TB_RRESUME_SKILLList)
            {
                objclsResumeSkillsDAL = new clsResumeSkillsDAL();
                if (Session["UserId"] != null)
                    ibjIN_TB_RRESUME_SKILL.USERID = Convert.ToInt32(Session["UserId"]);
                ibjIN_TB_RRESUME_SKILL.CREATED_BY = 1;
                ibjIN_TB_RRESUME_SKILL.MODIFIED_BY = 1;
                int resumeSkillid = objclsResumeSkillsDAL.SaveResumeSkills(ibjIN_TB_RRESUME_SKILL);
            }

        }
        catch (Exception)
        {

            throw;
        }

    }
    protected void btnOtherinfo_Click(object sender, EventArgs e)
    {
        try
        {

            clsOtherDAL objclsOtherDAL = new clsOtherDAL();
            IN_TB_OTHER ibjIN_TB_OTHER = new IN_TB_OTHER();
            if (Session["UserId"] != null)
                ibjIN_TB_OTHER.USER_ID = Convert.ToInt32(Session["UserId"]);
            ibjIN_TB_OTHER.DESIRED_JOB_TYPE = Convert.ToInt32(lblDJobType.Text);
            ibjIN_TB_OTHER.DESIRED_EMPOLOYMENT_TYPE = Convert.ToInt32(lblDemploymentType.Text);
            ibjIN_TB_OTHER.WORK_PERMIT_LOCATION = Convert.ToInt32(lblWorkPermitType.Text);
            ibjIN_TB_OTHER.HAVE_VISA = Convert.ToInt32(lblHaveVisa.Text);
            ibjIN_TB_OTHER.VISA_TYPE = Convert.ToInt32(lblVisaType.Text);
            ibjIN_TB_OTHER.CREATED_BY = ibjIN_TB_OTHER.USER_ID;
            ibjIN_TB_OTHER.CREATED_ON = DateTime.Now;
            ibjIN_TB_OTHER.MODIFIED_BY = ibjIN_TB_OTHER.USER_ID;
            ibjIN_TB_OTHER.MODIFIED_ON = DateTime.Now;
            int resumeid = objclsOtherDAL.SaveLOtherInfo(ibjIN_TB_OTHER);



        }
        catch (Exception)
        {

            throw;
        }





    }
    protected void CreateRESUME_SKILLList()
    {
        List<IN_TB_RRESUME_SKILL> objIN_TB_RRESUME_SKILLList = new List<IN_TB_RRESUME_SKILL>();
        Session["objIN_TB_RRESUME_SKILLList"] = objIN_TB_RRESUME_SKILLList;
    }

    protected void CreateProjectList()
    {
        List<IN_TB_USER_PROJECT> objIN_TB_USER_PROJECT = new List<IN_TB_USER_PROJECT>();
        Session["objIN_TB_USER_PROJECT"] = objIN_TB_USER_PROJECT;
    }
    //private void lblEmail_Validating(object sender, CancelEventArgs e)
    //{
    //    System.Text.RegularExpressions.Regex rEMail = new System.Text.RegularExpressions.Regex(@"^[a-zA-Z][\w\.-]{2,28}[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$");
    //    if (lblEmail.Text.Length > 0)
    //    {
    //        if (!rEMail.IsMatch(lblEmail.Text))
    //        {
    //            MessageBox.Show("E-Mail expected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    //            lblEmail.SelectAll();
    //            e.Cancel = true;
    //        }
    //    }
    //}

    protected void lblPhoneNumber_TextChanged(object sender, EventArgs e)
    {
        if (!(string.IsNullOrEmpty(lblPhoneNumber.Text)))
        {

            char[] chars = lblPhoneNumber.Text.ToCharArray();
            for (int i = 0; i < lblPhoneNumber.Text.Length; i++)
            {
                int code;
                code = Convert.ToInt16(chars);
                if (!((!(code > 58 || code < 48)) || (code == 68) || (code == 78) || (code == 35) || (code == 46)))
                {
                    lblPhoneNumber.Text = lblPhoneNumber.Text.Remove(i, 1);
                    //lblPhoneNumber.SelectionStart = lblPhoneNumber.Text.Length;
                }
            }
        }
    }
    protected void lblMobileNumber_TextChanged(object sender, EventArgs e)
    {
        if (!(string.IsNullOrEmpty(lblMobileNumber.Text)))
        {

            char[] chars = lblMobileNumber.Text.ToCharArray();
            for (int i = 0; i < lblMobileNumber.Text.Length; i++)
            {
                int code;
                code = Convert.ToInt16(chars);
                if (!((!(code > 58 || code < 48)) || (code == 68) || (code == 78) || (code == 35) || (code == 46)))
                {
                    lblMobileNumber.Text = lblMobileNumber.Text.Remove(i, 1);
                    // lblMobileNumber.SelectionStart = lblMobileNumber.Text.Length;
                }
            }
        }
    }

    protected void grdProjectDetails_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            //Getting Preferred Location
            int Preferred_locationId = Convert.ToInt32(e.Row.Cells[4].Text);
            clsCity objclsCity = new clsCity();
            IN_TB_CITY objIN_TB_CITY = new IN_TB_CITY();
            objIN_TB_CITY = objclsCity.GetCityById(Preferred_locationId);
            e.Row.Cells[4].Text = objIN_TB_CITY.CITY;
        }
    }

    protected void lblCurrentDesignation_DataBinding(object sender, EventArgs e)
    {



    }
    protected void lblCity_DataBinding(object sender, EventArgs e)
    {
        try
        {
            int cityId = Convert.ToInt32(lblCity.Text);
            clsCity objclsCity = new clsCity();
            IN_TB_CITY objIN_TB_CITY = new IN_TB_CITY();
            objIN_TB_CITY = objclsCity.GetCityById(cityId);
            lblCity.Text = objIN_TB_CITY.CITY;
        }
        catch (Exception)
        {

        }
    }
    protected void lblCity_Load(object sender, EventArgs e)
    {
        try
        {
            if (Convert.ToInt32(lblCity.Text) != 0)
            {
                int cityId = Convert.ToInt32(lblCity.Text);
                clsCity objclsCity = new clsCity();
                IN_TB_CITY objIN_TB_CITY = new IN_TB_CITY();
                objIN_TB_CITY = objclsCity.GetCityById(cityId);
                lblCity.Text = objIN_TB_CITY.CITY;
            }
        }
        catch (Exception)
        {

        }
    }
    protected void lblPreferedLocation_Load(object sender, EventArgs e)
    {
        try
        {

            int cityId = Convert.ToInt32(lblPreferedLocation.Text);
            clsCity objclsCity = new clsCity();
            IN_TB_CITY objIN_TB_CITY = new IN_TB_CITY();
            objIN_TB_CITY = objclsCity.GetCityById(cityId);
            lblPreferedLocation.Text = objIN_TB_CITY.CITY;
        }
        catch (Exception)
        {

        }
    }
    protected void lblcurrentLocation_Load(object sender, EventArgs e)
    {
        try
        {
            int cityId = Convert.ToInt32(lblcurrentLocation.Text);
            clsCity objclsCity = new clsCity();
            IN_TB_CITY objIN_TB_CITY = new IN_TB_CITY();
            objIN_TB_CITY = objclsCity.GetCityById(cityId);
            lblcurrentLocation.Text = objIN_TB_CITY.CITY;
        }
        catch (Exception)
        {


        }
    }
    protected void lblProjectLocation_Load(object sender, EventArgs e)
    {

    }
    protected void lblProjectEmploymentType_Load(object sender, EventArgs e)
    {

    }
    protected void lblFuntionalArea_Load(object sender, EventArgs e)
    {


    }
    protected void lblDJobType_Load(object sender, EventArgs e)
    {
        try
        {
            clsJobTypeDAL objclsJobTypeDAL = new clsJobTypeDAL();
            int JobTypeId = Convert.ToInt32(lblDJobType.Text);
            IN_TB_JOB_TYPE objIN_TB_JOB_TYPE = new IN_TB_JOB_TYPE();
            objIN_TB_JOB_TYPE = objclsJobTypeDAL.GetJobTypeById(JobTypeId);
            lblDJobType.Text = objIN_TB_JOB_TYPE.JOB_TYPE;
        }
        catch (Exception)
        {

        }
    }
    protected void lblDemploymentType_Load(object sender, EventArgs e)
    {
        try
        {
            clsEmploymentTypeDAL objclsEmploymentTypeDAL = new clsEmploymentTypeDAL();
            int EmploymentTypeId = Convert.ToInt32(lblDemploymentType.Text);
            IN_TB_EMPLOYMENT_TYPE objIN_TB_EMPLOYMENT_TYPE = new IN_TB_EMPLOYMENT_TYPE();
            objIN_TB_EMPLOYMENT_TYPE = objclsEmploymentTypeDAL.GetEmploymentTypeById(EmploymentTypeId);
            lblDemploymentType.Text = objIN_TB_EMPLOYMENT_TYPE.EMPLOYMENT_TYPE;
        }
        catch (Exception)
        {


        }
    }
    protected void lblWorkPermitType_Load(object sender, EventArgs e)
    {
        try
        {
            clsPermitTypeDAL objclsPermitTypeDAL = new clsPermitTypeDAL();
            int workPermitId = Convert.ToInt32(lblWorkPermitType.Text);
            IN_TB_WORK_PERMIT_TYPE objIN_TB_WORK_PERMIT_TYPE = new IN_TB_WORK_PERMIT_TYPE();
            objIN_TB_WORK_PERMIT_TYPE = objclsPermitTypeDAL.GetWorkPermitById(workPermitId);
            lblWorkPermitType.Text = objIN_TB_WORK_PERMIT_TYPE.WORK_PERMIT_TYPE;
        }
        catch (Exception)
        {


        }
    }

    protected void lblVisaType_Load(object sender, EventArgs e)
    {
        try
        {
            clsVisaTypeDAL objclsVisaTypeDAL = new clsVisaTypeDAL();
            int VisaTypeId = Convert.ToInt32(lblVisaType.Text);
            IN_TB_VISA_TYPE objIN_TB_VISA_TYPE = new IN_TB_VISA_TYPE();
            objIN_TB_VISA_TYPE = objclsVisaTypeDAL.GetvisaTypeById(VisaTypeId);
            lblVisaType.Text = objIN_TB_VISA_TYPE.VISA_TYPE;

        }
        catch (Exception)
        {
        }

    }

}
